import request from "@/utils/request";
// 获取全部
export const getBedApi = (BedRequestData) => {
  return request.request({
    url: `/admin/bed/pages`,
    method: "POST",
    data:BedRequestData,
  });
}

//更加id查询
export const getBedDataOneApi = (id) => {
  return request.request({
    url: `/admin/bed/one/${id}`,
    method: "GET",
  });
}
// 删除
export const deleteBedApi = (id) => {
  return request.request({
    url: `/admin/bed/delete/${id}`,
    method: "get",
  });
}

//更新
export const updateBedApi = (BedRequestData) => {
  return request.request({
    url: `/admin/bed/update`,
    data:BedRequestData,
    method: "post",
  });
}


//添加
export const addBedApi = (BedRequestData) => {
  return request.request({
    url: `/admin/bed/add`,
    data:BedRequestData,
    method: "POST",
  });
}


//获取没有的房间号
export const getBedNumApi = (id) => {
  return request.request({
    url: `/admin/bed/getBedNum/${id}`,
    method: "GET",
  });
}

//获取未使用的房间号
export const getBedNumAndIdApi = (id) => {
  return request.request({
    url: `/admin/bed/getBedNumId/${id}`,
    method: "GET",
  });
}